import tkinter as tk

root = tk.Tk()
root.geometry('500x300+350+250')
root.title('复选框')
a = ['打篮球','踢足球','打毛球']
c = tk.IntVar()
v = [1,2,3]
for i in range(len(a)):
    check = tk.Radiobutton(root,text=a[i],variable=c,value=v[i],justify='left')
    check.grid(row=i,column=0)
def check():

    for i in range(len(a)):
        if c.get()==v[i]:
            print(a[i])
tijiao = tk.Button(root,text='提交',command=check)
tijiao.grid()



root.mainloop()